home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CreatingGames / GameCreators / Inform / errata.txt < prev    next >
Encoding:
Text File  |  1997-03-15  |  72.2 KB  |  1,978 lines

  1. ============================================================================
  2.                          Errata (16 May 1997)
  3.                            for correcting
  4.        The Inform Designer's Manual, 3rd Ed. (4 September 1996)
  5. ============================================================================
  6.  
  7. In February I published a draft list of errata, and here is the
  8. final list: new or altered corrections (since the draft, that
  9. is) are marked with asterisks in the margin.
  10.  
  11. If these corrections are made then the manual becomes fully up to date
  12. with state-of-the-art Inform, i.e., Inform 6.13 and library 6/5.
  13. The primary version of the manual -- the TeX source code -- I've
  14. updated myself.
  15.  
  16. Conversions should please note on their title pages that these errata
  17. have been absorbed, if they have been.  For example, Stephen van
  18. Egmond's plain text copy might begin
  19.  
  20.          
  21.                        The Inform Designer's Manual
  22.  
  23.                             by Graham Nelson
  24.  
  25.                               Third edition
  26.  
  27.                             4 September 1996
  28.  
  29.                          as updated 16 May 1997
  30.  
  31. (note: the update date is the date of this errata list, not the date
  32. when the corrections were actually made by Stephen or whoever).
  33.  
  34. What has been changed?  Firstly there are a few dozen tiny mistakes,
  35. mostly typographical but some actually changing the meaning of the
  36. text.  Secondly the manual reflects improved facilities in Inform
  37. for grammar, for enterable objects and for touchability rules, as
  38. well as subtle changes brought on by these.  Thirdly a few passages
  39. have been clarified, usually at somebody's request.  Fourthly
  40. almost all the exercise solutions have been tidied up and debugged.
  41. (For some months the "Museum of Inform" example game has contained
  42. much better coded solutions to the exercises than the manual gave.)
  43.  
  44. I am especially indebted to Miron Schmidt for combing through the
  45. manual with infinite patience; and to several of the galley-slaves
  46. who spotted mistakes while reformatting, particularly Allison Weaver
  47. and Christopher Madsen.  I would also like to acknowledge the
  48. trouble taken by Torbj|rn Andersson, Timothy Buege, Kevin Bracey,
  49. Linards Ticmanis, Anson Turner, Lucian Smith and above all
  50. Charles Briscoe-Smith in commenting on and adding to the draft errata.
  51.  
  52.  
  53.                                              Graham Nelson
  54.                                              16 May 1997
  55.  
  56. [MORE]
  57.  
  58. References mainly given to page numbers in the TeX typeset original
  59. (4 September 1996) but note that Stephen van Egmond's plain text copy
  60. (11 October 1996) uses the same pagination and is easier to search.
  61. Italics below are written _thus_.  The notation \S indicates
  62. a section sign.  Text in a typewriter-style font is written between
  63. vertical strokes |thus|.
  64.  
  65. Exercise, book and section numbering is unchanged: thus the old
  66. exercise 63 is still called exercise 63 in the corrected version,
  67. and so on.
  68.  
  69.  
  70. Part I -- All alterations except those to exercise solutions
  71.           and to the list of library messages
  72.           ==================================================
  73.  
  74.  
  75. detailed contents of section 28:
  76.   *     replace "which applies to other people as well;" with
  77.   *     "touchability is stricter than scope;"
  78.  
  79. contents:    Change the title of section 3.14 from
  80.   *     "Footnote on common vs. individual objects"
  81.   *     to
  82.   *     "Footnote on common vs. individual properties"
  83.  
  84. p.6    The contents have the order of the appendices juggled.  The
  85.     correct sequence of A7, A8, A9 is:
  86.  
  87.     A7    Library-defined objects and routines
  88.     A8    Library actions
  89.     A9    Library message numbers
  90.  
  91. p.7    After "...becoming someone else in mid-game." and before
  92.     "The world-model includes...", insert the sentence "It can be
  93.     configured to languages other than English."
  94.  
  95. p.8     Alter "with a line reading just |...|"
  96.   *     to "with a line reading just ``|...|''", i.e., put the ellipsis
  97.   *     in quotation marks.
  98.  
  99. p.8    Delete first "from" in "To keep from Book Two from ...".
  100.  
  101. p.8    Delete the sentence "There is also a 'Shell' game ... anyway."
  102.  
  103. p.8     Replace "The best source for Inform..." with "The Internet
  104.   *     source for Inform..." and change the sentence giving the ftp
  105.   *     directory to:
  106.   *     
  107.   *     Inform can be found at:
  108.   *     |ftp://ftp.gmd.de/if-archive/infocom/compilers/inform6|
  109.  
  110. p.8    Delete the passage
  111.  
  112.     Another useful resource is the Inform home page on the `World
  113.     Wide Web', currently maintained by Gareth Rees at:
  114.     |http://www.cl.cam.ac.uk/users/gdr11/inform|
  115.  
  116.     and replace with
  117.  
  118.     Another useful resource is the Inform 6 home page on the `World
  119.     Wide Web', which includes Gareth Rees's `Alice' tutorial,
  120.     located at:
  121.     |http://www.gnelson.demon.co.uk/inform.html|
  122.  
  123. p.9    Rewrite the sentence
  124.  
  125.     This manual describes Inform release 6.04 (or later), using
  126.     library release 6/2 (or later).  Inform 6.01 to 6.03 and
  127.     library 6/1 are very similar but Inform 5.5 and 5/12 very
  128.     different.
  129.     
  130.     as
  131.     
  132.   *     This manual describes Inform release 6.13 (or later), using
  133.   *     library release 6/5 (or later).  Earlier Inform 6 compilers and
  134.   *     libraries are very similar but Inform 5.5 and 5/12 are very
  135.   *     different.
  136.     
  137. p.9    Correct "So there are three `companion volumes'." to
  138.     "So there are four `companion volumes'."  At the end of this
  139.     paragraph add the sentence
  140.  
  141.     _The Inform Translator's Manual_ describes how to write a
  142.     language definition file for games which speak languages
  143.     other than English.
  144.  
  145. p.10    Correct the signing-off date to May 1997.
  146.  
  147. p.18    Replace "One such operator is =:" with "One such operator is
  148.         `set equals':"
  149.  
  150. p.20    Remove "(there can be any number from none up to 7)".  Instead
  151.     add a new sentence after this one, reading:
  152.  
  153.         Usually, there can be any number of arguments from none up to 7,
  154.         though a limit of 3 applies if Inform has been told to compile
  155.         an early-model story file (see \S 31 for details).
  156.  
  157. p.21    To the end of the text about |or|, continue with the following:
  158.  
  159.   *     For example
  160.   *     |    if (player in Forest or Village or Building) ...|
  161.   *     often makes code much clearer than writing three separate conditions
  162.   *     out; or
  163.   *     |    if (x > 100 or y) ...|
  164.   *     can be convenient to check whether |x| is bigger than the minimum of
  165.   *     100 or |y|.
  166.  
  167.  
  168. p.25    (foot of page) replace "...is deferred until \S 3." with
  169.     "...is deferred until \S 3.4."
  170.  
  171. p.27    Replace
  172.  
  173.     But there is always an escape.  One drastic solution is to
  174.     return from the current routine, in which case any loops are
  175.     forgotten about.  Another is to use |jump| (see later on)
  176.     to run away.  But the tidiest solution is to execute the
  177.     statement |break|, which causes execution to "break out of"
  178.     the current innermost loop or |switch| statement: it can
  179.     be read as "finish early".
  180.  
  181.     with
  182.  
  183.     But there is always an escape.  One way is to |return| from
  184.     the current routine.  Another is to |jump| to a label outside
  185.     the loop (|jump| will be covered in \S 1.13 below).  It's
  186.     neater to use the statement |break|, which causes execution to
  187.     "break out of" the current innermost loop or |switch| statement:
  188.     it can be read as "finish early".  All these ways out are
  189.     entirely "safe", and there is no harm in leaving a loop only
  190.     half-done.
  191.  
  192. p.31    The first line of the examples on accents should read:
  193.  
  194.   *     print "Les @oeuvres d'@Aesop en fran@ccais, mon @'el@`eve!";
  195.  
  196.         (The previous macaronic version was a sort of unfunny joke)
  197.  
  198. p.31    For "Arvo Part", read "Arvo P@:art", that is, place a double-dot
  199.     accent over the "a" in "Part".
  200.  
  201. p.34    At the end of 1.14, after the table of printing rules,
  202.         insert:
  203.         
  204.   *     Note that |(the)| in lower case does something different from |(The)|
  205.   *     with an upper case T.  This is very unusual!  (Directive names,
  206.   *     which will turn up in \S 2, variable names and so on are allowed to
  207.   *     use upper case and the case is simply ignored, so that |fRoG|
  208.   *     means the same as |frog|.  But statement keywords, like |print|
  209.   *     or |(name)|, have to be in lower case -- except for |(The)|.)
  210.  
  211.         and then insert a paragraph break so that the sentence starting
  212.         "To create a new rule..." is now a paragraph in its own right.
  213.  
  214. p.36    (closing words of section 1)  Change "See \S 2 for details."
  215.     to "See \S 2.5 for details."
  216.  
  217. p.39    In "To recapitulate, Inform provides four kind of array in all:"
  218.     "kind" should be "kinds".
  219.  
  220. p.39    (just after the |primes| array)  "is is a word array" should
  221.     read "is a word array".
  222.  
  223. p.39    An invisible mistake: ``text buffers'' (in the Frank Booth
  224.     paragraph) should be index-marked, but in the TeX source it
  225.     isn't, because of a mistype.
  226.  
  227. p.40    Replace "There are more efficient ways to shuffle the pack."
  228.     with "The example code shuffles the pack in a simple way, but
  229.     there are more efficient methods."
  230.  
  231. p.43    Replace
  232.   *     |parse_buffer-->(n*2 - 2)|
  233.   *     with
  234.   *     |parse_buffer-->(n*2 - 1)|
  235.  
  236. p.44    Remove the sentence "The point has already been made that
  237.     Inform's routines satisfy all the philosophical criteria to
  238.     be called objects."  (Who wrote this pompous drivel?)
  239.  
  240. p.47    In the syntax of the Object directive, exchange <name> and
  241.     <arrows>.  Thus it should read
  242.     
  243.     Object <arrows> <name> "textual name" <parent>
  244.     
  245.     Similarly exchange notes 1. and 2. explaining what these are.
  246.     Thus note 1. should now start "The <arrows> ..." and note 2.
  247.     should now start "The <name> ...".  (This should correct what
  248.     Miron Schmidt was kind enough to call "an outright lie".)
  249.  
  250. p.55    Delete "an" from
  251.   *     "one of the four kinds of an object"
  252.  
  253. p.55    At the end of the "For example, |print kestrel.flying_strength|
  254.     paragraph, add the sentence:
  255.     
  256.     (You can see all the messages being sent in a game as it runs
  257.     with the debugging verb "messages": see \S 30 for details.)
  258.  
  259. p.56    "or |nothing| if it wasn't sent from |Object|" should read
  260.     "or |nothing| if it wasn't sent from an |Object|".
  261.  
  262. p.62    Change the title of section 3.14 from
  263.   *     "Footnote on common vs. individual objects"
  264.   *     to
  265.   *     "Footnote on common vs. individual properties"
  266.  
  267. p.62    Replace the entire footnote (that is, the whole text of section
  268.     3.14, though the title should remain) with the following:
  269.  
  270.     <triangle> <triangle>  The properties used in the sections above
  271.     are all examples of ``individual properties'', which some objects
  272.     provide and others do not.  There are also ``common properties''
  273.     which, because they are inherited from the class |Object|, are
  274.     provided by every member of |Object|.
  275.  
  276.   *     An example is |capacity|.  The |capacity| can be read for an
  277.   *     ordinary game object (say, a crate) even if it doesn't specify a
  278.   *     |capacity| for itself, and the resulting ``default'' value will
  279.   *     be 100.  However, this is only a very weak form of inheritance --
  280.   *     you can't change the crate's |capacity| value and the condition
  281.   *     |crate provides capacity| evaluates to |false|.
  282.     
  283.     The properties defined by the Inform library, such as
  284.     |capacity|, are all common: mainly because common properties
  285.     are marginally faster to access and marginally cheaper on memory.
  286.   *     Only 62 are available, of which the library uses up 48.
  287.   *     Individual properties, on the other hand, are practically
  288.   *     unlimited. It is therefore worth declaring a common property only
  289.   *     in those cases where it will be used very often in your program.
  290.   *     You can declare common properties with the directive:
  291.     
  292.     |Property| <name>|;|
  293.  
  294.     which should be made after the inclusion of "Parser" but before
  295.     first use of the new name.  The class |Object| will now
  296.     pass on this property, with value 0, to all its members.  This
  297.     so-called ``default value'' can optionally be specified.  For
  298.     example, the library itself makes the declaration
  299.  
  300.     |Property capacity 100;|
  301.  
  302.     which is why all containers in a game which don't specify any
  303.     particular |capacity| can hold up to 100 items.
  304.  
  305. p.64    In the paragraph ending "on-line documentation.", add a new
  306.     final sentence:
  307.     
  308.     Note however that a filename can contain spaces if it is written
  309.     in double-quotes.
  310.  
  311. p.65    Replace "set these switches" (top of page) with:
  312.  
  313.   *    set these switches; or unset any switch preceded by a tilde |~|.
  314.   *    (For example, |-a~bc| sets |a|, unsets |b| and sets |c|.)
  315.  
  316. p.65    under "|+<name>=<filename>|", alter "the filename for a directory"
  317.   *    to "one or more filenames of directories, separated by commas".
  318.  
  319. p.65    Add the following to the end of the first paragraph in section
  320.     4.2:
  321.  
  322.     (The rules for how Inform interprets |"filename"|
  323.         vary from machine to machine: run Inform with the |-h1| switch
  324.         for information.)  Note that you can write
  325.  
  326.     |Include ">shortname";|
  327.  
  328.         to mean "the file called |"shortname"| which is in the same
  329.         directory that the present file came from".  This is convenient
  330.         if all the files making up the source code of your game are
  331.         housed together.
  332.  
  333. p.67    In the code example beginning "For example, |Ifndef VN_1601|"
  334.         and the sentence after it, correct 1601 to 1610 and 6.01 to 6.10.
  335.  
  336. p.69    Add the switches:
  337.  
  338.   *     |d2  contract double spaces after exclamation and question
  339.              marks, too|
  340.  
  341.   *     |g2  traces calls to all functions|
  342.  
  343.   *     |E2  Macintosh MPW-style error messages|
  344.  
  345.         and correct the -g switch entry to
  346.  
  347.   *     |g   traces calls to functions (except those in the library)|
  348.  
  349. p.70    The reference to \S 4.5 in the entry under the |M| switch
  350.     should be to \S 4.3.
  351.  
  352. p.73    "If this limit is passed, the error" should read "If this limit
  353.     is passed, Inform generates the error".
  354.  
  355. p.74    In "one syntax mistake threw Inform off the right track, so
  356.     that continued not to know" insert "it" between "that" and
  357.     "continued".
  358.  
  359. p.77    Delete one of the two identical "'Ifnot' without..." lines
  360.     listed just under "8. Conditional compilation".
  361.  
  362. p.77    Delete one of the two dollar signs $ in the code line
  363.  
  364.         Iftrue #strings_offset==$$4a50;
  365.  
  366. p.77    Delete one of the two "must"s in the third line under
  367.     "9. Miscellaneous".
  368.  
  369. p.80    Replace:
  370.  
  371.   *    For instance, ordinarily ``take'', ``get'', ``carry'' and
  372.   *    ``hold'' are one single Inform verb, but this directive
  373.   *     could split off ``carry'' and ``get'' from the other two.
  374.   *     The warning would arise if one tried to split off ``take''
  375.   *     and ``drop'' together, which come from different original
  376.   *     Inform verbs.
  377.  
  378.     with:
  379.     
  380.   *    For instance, ordinarily ``examine'', ``watch'', ``check'' and
  381.   *    ``describe'' are one single Inform verb, but this directive
  382.   *     could split off ``examine'' and ``watch'' from the other two.
  383.   *     The warning would arise if one tried to split off ``examine''
  384.   *     and ``search'' together, which come from different original
  385.   *     Inform verbs.
  386.     
  387. p.82    (foot of page)  The reference to \S 4 should be to \S 4.3.
  388.  
  389. p.89    "the idea is clear enought" should read "the idea is clear
  390.     enough".
  391.  
  392. p.93    ThrowAt occurs twice in the list of group 3 actions.
  393.   *     Delete the first occurrence.
  394.  
  395. p.98    After the sunlight object code example, add the sentence:
  396.  
  397.     (The |^| symbol in |"sun^s"| means an apostrophe, so the
  398.     word is "sun's".)
  399.  
  400. section 14   Add a new second and third paragraph:
  401.  
  402.   *     If the player gets into a |container| and then closes it, the
  403.   *     effect is like being in a different location.  (Unless the container
  404.   *     has the |transparent| attribute and is therefore see-through.)
  405.   *     The interior may be dark, but if there's light to see by, the
  406.   *     player will want to see some kind of room description.  In any case,
  407.   *     many enterable objects ought to look different from inside or on
  408.   *     top.  Inside a vehicle, a player might be able to see a steering
  409.   *     wheel and a dashboard, for instance.  On top of a cupboard, it
  410.   *     might be possible to see through a skylight window.
  411.  
  412.   *     For this purpose, any |enterable| object can provide a property
  413.   *     called |inside_description|, which can be a string or a routine
  414.   *     to print one, as usual.  If the exterior location is still
  415.   *     visible, then the "inside description" is added to the
  416.   *     normal room description, and otherwise it becomes that
  417.   *     description.  As an extreme example, suppose that the player
  418.   *     gets into a huge cupboard, closes the door behind her and
  419.   *     then gets into a plastic cabinet inside that.  The resulting
  420.   *     room description might read like so:
  421.   *
  422.   *     _The huge cupboard_ (in the plastic cabinet)
  423.   *     It's a snug little cupboard in here, almost a room in itself.
  424.   *     
  425.   *     In the huge cupboard you can see a pile of clothes.
  426.   *     
  427.   *     The plastic walls of the cabinet distort the view.
  428.   *
  429.   *     The second line is the |inside_description| for the huge
  430.   *     cupboard, and the fourth is that for the plastic cabinet.
  431.  
  432.  
  433. p.116    "...overlap much more with Chapter ***" should read
  434.     "...overlap much more with Chapter V".
  435.  
  436. p.118    (in References) Delete the bulleted sentence beginning
  437.     "|orders| and |grammar| are newly introduced..."
  438.  
  439. section 17   The definitions for light are slightly altered and
  440.         now read:
  441.         
  442.   *     An object `offers light' if:
  443.   *     it itself has the |light| attribute set, or
  444.   *     any of its immediate possessions `have light', or
  445.   *     it is see-through and its parent offers light;
  446.   *     while an object `has light' if:
  447.   *     it currently has the |light| attribute set, or
  448.   *     it is see-through and one of its immediate possessions
  449.   *     has light, or
  450.   *     any of the things it ``adds to scope'' (see Chapter V) have light.
  451.  
  452. p.122    Top line: replace the word "alternatively" with "also".
  453.     Delete the entire next sentence: "Alternatively because an object
  454.     can't have both a |timer| and a |daemon| going at the same time."
  455.  
  456. p.122    Replace
  457.  
  458.     'Each turn' is entirely separate from daemons and timers.
  459.     Although an object can't have both a timer and a daemon at the
  460.     same time, it can have an |each_turn| at the same time, and
  461.     this is quite useful, especially to run creatures.
  462.  
  463.     with
  464.  
  465.     'Each turn' is especially useful to run creatures which stay
  466.     in one room and are only active when the player is nearby.
  467.  
  468. p.132    (second triangle-marked paragraph) "because haven't got
  469.     default values" should be "because they haven't got default
  470.     values".
  471.  
  472. p.134    (references to section 22)
  473.   *    Delete the reference to "pluralobj.h" (it's now incorporated
  474.   *     into the library).
  475.  
  476. p.133    (top of page) The reference to \S A8, in the paragraph
  477.     beginning "The |Jump| action...", should to be \S A9.
  478.  
  479. p.136    Replace the paragraph:
  480.  
  481.     The indefinite article for an object is held in the property
  482.     |article| and is assumed to be `a' if none is declared.
  483.     That means that if the short name starts with a vowel, you need
  484.     to set it to `an'.  But article offers much more amusement:
  485.  
  486.     with:
  487.     
  488.     Inform tries to work out the right indefinite article for
  489.     any object automatically.  In English-language games, it uses
  490.     `an' when the short name starts with a vowel and `a' when it
  491.     does not (unless the name is plural, when `some' is used
  492.     in either case).  You can override this by setting |article|
  493.     yourself.  Here are some possibilities:
  494.  
  495. p.136    Delete the words:
  496.  
  497.     , in case, let us say, "a pregnant mouse" has to change to
  498.     "some mice"
  499.  
  500. p.136    After the articles discussion, and just before the paragraph
  501.     beginning "The short name of an object...", add two new
  502.     paragraphs.  First an ordinary one in running text:
  503.  
  504.     A single object whose name is plural, such as "grapes"
  505.     or "marble pillars", should be given the attribute
  506.     |pluralname|.  As a result the library might say, e.g.,
  507.     "You can't open those" instead of "You can't open that".
  508.     It also affects the pronoun "them" and makes the usual
  509.     indefinite article "some".
  510.  
  511.     Second, immediately following, a new triangle-marked
  512.     paragraph:
  513.  
  514.     You can give |animate| objects the attributes |male|, |female|
  515.     or |neuter| to help the parser understand pronouns properly.
  516.     |animate| objects are assumed to be male if you set neither
  517.     alternative.
  518.  
  519. p.139    (in the numbered small print, mid-page, point 3) delete the
  520.     second "then" (there are two "then"s in a row, one bold-face,
  521.     the other Roman).
  522.  
  523. p.139    (paragraph before Exercise 51)  Reference to \S A9 should be
  524.     to \S A7.
  525.  
  526. p.143    The word "catachrestic" is correctly spelt in the text,
  527.     but incorrectly spelt "catchrestic" in the index mark.
  528.  
  529. p.144    After the sentence "Remember that the dictionary only has
  530.     9-character resolution." add "(And only 6 if Inform has been
  531.     told to compile an early-model story file: see \S 31.)"
  532.  
  533. p.146    (start of exercise 63) "There is no problem with a calling"
  534.     should read "There is no problem with calling"
  535.  
  536. p.148    Replace the sentence
  537.  
  538.     The simplest way to do this is just to put "crowns" in their
  539.     |name| lists, and this works perfectly well most of the time.
  540.  
  541.         with:
  542.  
  543.         Putting the word |"crowns"| in their |name| lists is not quite
  544.         right, because the parser will still think that ``crowns'' might
  545.         refer to a specific item.  Instead, put in the word |"crowns//p"|.
  546.         The |//p| marks out the dictionary word "crowns" as one that
  547.         can refer to more than one game object at once.  (So that
  548.         you shouldn't set this for the word "grapes" if a bunch of
  549.   *     grapes was a single game object; you should give that object
  550.   *     the |pluralname| attribute instead.)  For example the |GoldCoin|
  551.         class would read:
  552.         
  553.         |Class  GoldCoin
  554.            with name "gold" "coin" "coins//p",
  555.                 short_name "gold coin",
  556.                 plural "gold coins";|
  557.  
  558.         and now when the player types ``take coins'', the parser
  559.         interprets this as ``take all the coins within reach''.
  560.  
  561. p.148    In the immediately following double-triangle paragraph, replace
  562.     the opening sentence and next eight words:
  563.  
  564.     But it isn't ideal, because ... available crowns.  So the
  565.     complicated (but better) way is to
  566.  
  567.         with:
  568.         
  569.         The only snag is that now the word |"coins"| is marked as
  570.         |//p| everywhere in the game, in all circumstances.  Here is
  571.   *     a more complicated way to achieve the same result, but
  572.   *     strictly in the context of these objects alone.  We need to
  573.  
  574. p.149    Change the list of equal verbs from
  575.  
  576.     "take" = "get" = "carry" = "hold"
  577.     
  578.     to
  579.  
  580.     "take" = "carry" = "hold"
  581.  
  582. p.151    At the very top of the page, i.e. after the sample grammar
  583.     at the foot of p.150 and before the words "Each line of grammar"
  584.     insert the sentence:
  585.     
  586.     (You can look at the grammar being used in a game with the
  587.     debugging verb "showverb": see \S 30 for details.)
  588.  
  589. p.151    In the double-triangle section, replace the opening sentence:
  590.  
  591.     "As mentioned above, the parser thinks "take" and "get"
  592.     are exactly the same."
  593.  
  594.     with:
  595.     
  596.     Since this book was first written, the library has been
  597.     improved so that "take" and "get" each have their own
  598.     independent grammars.  But for the sake of example,
  599.     suppose they share the grammar written out above.
  600.  
  601. p.151    After the paragraph in which XyzzySub is written out,
  602.     add a new single-triangle paragraph:
  603.  
  604.     Finally, the line can end with the word |reverse|.
  605.     This is only useful if there are objects and numbers
  606.     in the line are parsed in the wrong order.  An example
  607.     from the library's grammar:
  608.  
  609.         |Verb "show" "present" "display"
  610.                 * creature held                  -> Show reverse
  611.                 * held "to" creature             -> Show;|
  612.  
  613.         The point is that the |Show| action expects the first
  614.         parameter to be an item, and the second to be a person.
  615.         When the text ``show him the shield'' is typed in, the
  616.         parser must reverse the two parameters ``him'' and
  617.         ``the shield'' before causing a |Show| action.  On the other
  618.         hand, in ``show the shield to him'' the parameters are in
  619.         the right order already.
  620.  
  621. p.153    (foot of page) After the first paragraph on prepositions,
  622.     and before the triangle-marked second paragraph, insert
  623.     the (ordinary) paragraph:
  624.     
  625.     It often happens that several prepositions really mean
  626.     the same thing for a given verb: "in", "into" and "inside"
  627.     are often equally sensible.  As a convenient shorthand
  628.     you can write a series of prepositions with slash marks |/|
  629.     in between, to mean "one of these words".  For example:
  630.     
  631.     |     * noun "in"/"into"/"inside" noun      -> Insert|
  632.  
  633.     (Note that |/| can only be used with prepositions.)
  634.  
  635. p.154    Add a new token to the table, just before [special]:
  636.  
  637.     [topic]        any text at all
  638.  
  639. p.157    Add a new paragraph just before the one explaining [special]:
  640.  
  641.     [topic] This token matches as much text as possible.
  642.     It should either be at the end of its grammar line, or
  643.     be followed by a preposition.  (The only way it can fail
  644.     to match is if it finds no text at all.)  The library's
  645.     grammar uses this token for topics of conversation and
  646.     topics looked up in books (see \S\S 15, 16), hence the
  647.     name.  The parser ignores the text for now (your own code
  648.     will have to think about it later), and simply sets
  649.     the variables |consult_from| to the first word of the
  650.     matched text and |consult_words| to the number of words.
  651.  
  652. p.159    (final words of section 27) "see the specification of the
  653.     |NounDomain| library routine in \S A9."  Reference should be
  654.     to \S A7.
  655.  
  656. after the "megalook" exercise and before "The rest of this
  657.         section...": insert the passage
  658.  
  659.   *     Formally, scope determines what you can talk about, which usually
  660.   *     means what you can see.  But what can you touch?  Suppose a locked
  661.   *     chest is inside a sealed glass cabinet.  The Inform parser will
  662.   *     allow the command ``unlock chest with key'' and generate the
  663.   *     appropriate action, |Unlock chest key|, because the chest is in
  664.   *     scope, so the command at least makes sense.
  665.  
  666.   *     But it's impossible to carry out, because the player can't reach
  667.   *     through the solid glass.  So the library's routine for handling the
  668.   *     |Unlock| action needs to enforce this.  The library does this
  669.   *     using a stricter rule called ``touchability''.  The rule is that
  670.   *     you can touch anything in scope unless there's a closed container
  671.   *     between you and it.  This applies either if you're in the container,
  672.   *     or if it is.
  673.  
  674.   *     Some purely visual actions don't require touchability -- |Examine|
  675.   *     or |LookUnder|, for instance.  But most actions are tactile, and
  676.   *     so will many actions created by designers.  If you want to make
  677.   *     your own action routines enforce touchability, you can call the
  678.   *     library routine |ObjectIsUntouchable(obj)|.  This either returns
  679.   *     |false| if there's no problem in touching |obj|, or returns |true|
  680.   *     and prints a suitable message (such as ``The solid glass cabinet
  681.   *     is in the way.'').  Thus, the first line of many of the library's
  682.   *     action routines is:
  683.   *
  684.   *         if (ObjectIsUntouchable(noun)) return;
  685.   *
  686.   *     You can also call |ObjectIsUntouchable(obj, true)| to simply return
  687.   *     true or false, and print nothing, if you'd rather provide your
  688.   *     own failure message.
  689.  
  690. p.162    "it should execute |InScope| and |ScopeWithin|" should read
  691.     "it should execute |PlaceInScope| and |ScopeWithin|".
  692.  
  693. p.164    Replace
  694.  
  695.     apply to all three pronouns ("it", "him" and "her")
  696.     
  697.     with
  698.     
  699.     apply to all pronouns (in English, "it", "him", "her" and "them")
  700.  
  701.   *     Replace the bracketed clause in the next sentence,
  702.   *      
  703.   *     ('it', 'him' or 'her')
  704.   *      
  705.   *     with
  706.   *      
  707.   *     ('it', 'him', etc.)
  708.  
  709.     Delete the sentence:
  710.     
  711.     Note that the variables |itobj|, |himobj| and |herobj| hold
  712.     the current settings of the pronouns.
  713.  
  714.         And add a new (normal) paragraph immediately after this point:
  715.         
  716.     You can find out the current setting of a pronoun using
  717.     the library's |PronounValue| routine: for instance,
  718.     |PronounValue('it')| would give the object which "it"
  719.     currently refers to (possibly |nothing|).  Similarly
  720.     |SetPronoun('it', magic_ruby)| would set "it" to mean
  721.     the magic ruby object.  (When something like a magic ruby
  722.     suddenly appears in the middle of a turn, players will
  723.     habitually call it "it".)  A better way to adjust the
  724.     pronouns is to call |PronounNotice(magic_ruby)|, which
  725.     sets whatever pronouns are appropriate.  That is, it
  726.     works out if the object is a thing or a person, of what
  727.     number and gender, which pronouns apply to it in the parser's
  728.     current language, and so on.  In code predating Inform 6.1
  729.     you may see variables called |itobj|, |himobj| and
  730.     |herobj| holding the English pronoun values: these still
  731.     work properly, but please use the modern system in
  732.     new games.
  733.  
  734. p.164    Replace
  735.  
  736.     0 means the parser is intending not to include it, 1 means it
  737.     intends not to.
  738.  
  739.     with
  740.  
  741.     0 means the parser has decided against, 1 means it has decided
  742.     in favour.
  743.  
  744.     In numbered lines 1 and 2 immediately following, replace "it" with
  745.     "the object".
  746.  
  747. p.165    (Yes, It's Infocom Nostalgia Pedantry Time!)  Replace "and the
  748.     original Infocom parser" with "and the parsers in most of the
  749.     Infocom games".
  750.  
  751. p.166    Opening line: for "Sorceror" read "Sorcerer".
  752.  
  753. p.166    Replace the sentence beginning "Inform provides a small suite..."
  754.     up to "...including the library files." with:
  755.  
  756.     Inform provides a small suite of debugging verbs,
  757.     which will be added to any game compiled with the |-D| switch.
  758.     If you prefer, you can include them manually by writing
  759.  
  760.         |Constant DEBUG;|
  761.  
  762.     somewhere in the program before the library files are included.
  763.  
  764. p.166    Three additional lines for the table of debugging verbs.
  765.         Add to the top of the list:
  766.  
  767.     |showobj <anything>|
  768.  
  769.         Insert after the "scope" line:
  770.  
  771.     |showverb <verb>|
  772.  
  773.         Insert after the "routines" line:
  774.  
  775.         |messages   messages on   messages off|
  776.  
  777. p.167    Corresponding changes in the big paragraph describing these
  778.     verbs.  Insert a new first sentence:
  779.  
  780.     "showobj" is very informative about the current state of
  781.     an object.
  782.  
  783.     After the "scope" sentence, add:
  784.  
  785.     "showverb" will display the grammar being used when the
  786.     given verb is parsed.
  787.  
  788.     Before the "timers" sentence, add:
  789.     
  790.     It also describes all messages sent in the game, which is
  791.     why it can also be written as "messages".
  792.  
  793. p.167    Replace the two short paragraphs about Infix with the
  794.         latest prevarication:
  795.         
  796.    *    A source-level debugger for Inform, called Infix,
  797.    *    has been planned for some years, and may possibly be coming
  798.    *    to fruition soon.
  799.  
  800.    *    (danger) For the benefit of such tools, Inform (if compiling
  801.    *    with the |-k| option set) produces a file of "debugging
  802.    *    information" (cross-references of the game file with the
  803.    *    source code), and anyone interested in writing an Inform
  804.    *    utility program may want to know the format of this file:
  805.    *    see the _Technical Manual_ for details.
  806.  
  807. p.167    In the next paragraph replace "Zip is better here and" with
  808.     "A Standard interpreter"
  809.  
  810. p.168    References: delete the reference to David Wagner's "showobj".
  811.  
  812. p.169    In the table of maximum sizes of games in different versions,
  813.     the entry for V6 should read 512, not 576.  (Not a typo but
  814.     a reconsideration.)
  815.  
  816. p.170    (passage on memory management) "restrictions" should read
  817.     "restriction".
  818.  
  819. p.170    (limit for function calls)  Alter "(Or, in V3, at most 3.)"
  820.     to "(Or, in V3 and V4, at most 3.)".
  821.  
  822. p.170    (passage on Abbreviate)  Replace "A good list of abbreviations
  823.     can be found in the _Technical Manual_: basically," with
  824.     "When choosing abbreviations,".  Insert a new sentence to follow
  825.     that one:
  826.  
  827.     Good choices include |" the "|, |"The"|, |", "|,
  828.     |"and"|, |"you"|, |" a "|, |"ing"|, |" to"|.
  829.  
  830. p.171    Delete the initial WARNING.  (Support for V3 games is gradually
  831.     being withdrawn, and this warning only puts people needlessly
  832.     off.)
  833.  
  834. p.174    (top) Delete the sentence "The author recommends that anyone
  835.     using exotic assembly-language... on both."
  836.  
  837.     Replace the next sentence, "All three common interpreters are,
  838.     in fact, pretty reliable." with:
  839.     
  840.   *    Interpreters conforming to the Z-Machine Standard, usually
  841.   *    but not always derived from Frotz or Zip, are reliable and
  842.   *    widely available.
  843.  
  844. p.175    (passage on buffer_mode)  "This turns on (|flag=1|) or off
  845.     (|flag=1|)...": the second time should be |flag=0|.
  846.  
  847. p.177   For "Torbj@/orn Andersson", read "Torbj@:orn Andersson",
  848.   *     that is, replace the slash on the second "o" with a
  849.   *     diaresis (double-dot) accent.
  850.  
  851. p.177    Replace the WARNING with the following:
  852.  
  853.     WARNING:
  854.     Some of these features may not work well on obsolete interpreters
  855.     which do not adhere to the Z-Machine Standard.  Standard
  856.     interpreters are widely available, but if seriously worried
  857.     you can test whether your game is running on a good interpreter:
  858.  
  859.         |if (standard_interpreter == 0)|
  860.         |{   print "This game must be played on an interpreter obeying the|
  861.         |     Z-Machine Standard.^";|
  862.         |    @quit;|
  863.         |}|
  864.  
  865. p.179    Table of operator precedences: in the line for level 11,
  866.     on function calls, replace the text
  867.     
  868.     function call
  869.     
  870.     with
  871.     
  872.     function call on right hand side
  873.  
  874.         and add a new bottom line:
  875.         
  876.         14    (...)    binary    left    function call on left hand side
  877.  
  878. p.183    In the syntax explanation: replace the 6 (the maximum number
  879.     of tokens per line) with 31.  At the end of the syntax paragraph
  880.     insert the following new paragraph:
  881.     
  882.     A grammar line can optionally be followed by the word
  883.     |reverse|.  This signals that the action to be generated has
  884.     two parameters, but which have been parsed in the wrong
  885.     order and need to swapped over.  (Note that a |topic| is
  886.     not a parameter, and nor is a preposition.)
  887.  
  888. p.183    Add a new token to the summary table, just before [special]:
  889.  
  890.     [topic]        any text at all
  891.  
  892. p.183    Add a new paragraph immediately after the summary table:
  893.  
  894.     Two or more literal words (only) can be written with slash
  895.     signs |/| between them as alternatives.  E.g., |"in"/"on"|
  896.     matches either the word "in" or the word "on".
  897.  
  898. p.185    Entry for the attribute |female|: replace with the following:
  899.  
  900.     This object has a feminine name.  In games written in English,
  901.     this makes her a female person, though in other languages it might
  902.     be inanimate.  The parser uses this information when considering
  903.     pronouns like "her".  (In English, anything |animate| is assumed
  904.     to be male unless |female| or |neuter| is set.)
  905.  
  906.     Insert the following similar entry for new attribute |male|:
  907.  
  908.     This object has a masculine name.  In games written in English,
  909.     this makes him a male person, though in other languages it might
  910.     be inanimate.  The parser uses this information when considering
  911.     pronouns like "him".  (In English, anything |animate| is assumed
  912.     to be male unless |female| or |neuter| is set.)
  913.  
  914.         And then for the new attribute |neuter|:
  915.  
  916.     This object's name is neither masculine nor feminine.  (In
  917.     English, anything without |animate| is assumed neuter, because
  918.     only people and higher animals have gender.  Anything |animate|
  919.     is assumed male unless |female| or |neuter| is set.  A
  920.     robot, for instance, might be an |animate| object worth making
  921.     |neuter|.)
  922.  
  923. p.185    Insert the following entry for new attribute |pluralname|:
  924.  
  925.     This single object's name is in the plural.  For instance, an
  926.     object called "seedless grapes" should have |pluralname| set.
  927.     The library will then use the pronoun "them" and the indefinite
  928.     article "some" automatically.
  929.  
  930. p.186    Insert a new property entry:
  931.  
  932.     articles                                 Array of strings
  933.     
  934.     For objects: If given, these are the articles used with
  935.     the object's name.  (Provided for non-English languages
  936.     where irregular nouns may have unusual vowel-contraction
  937.     rules with articles: e.g. with French non-mute H.)
  938.  
  939. p.187   Under |daemon|: remove the warning line "The same object
  940.     cannot..."
  941.  
  942. another new property entry:
  943.  
  944.   *     inside_description                       String or routine
  945.  
  946.   *     For objects: Printed as part or all of a room description
  947.   *     when the player is inside the given object, which must be
  948.   *     |enterable|.
  949.  
  950. p.190    Insert a new property entry:
  951.  
  952.     short_name_indef                                Routine
  953.     
  954.     For objects: If set, this form of the short name is used
  955.     when the name is prefaced by an indefinite article.  (This
  956.     is not useful in English-language games, but in other
  957.     languages adjectival parts of names agree with the
  958.     definiteness of the article.)
  959.  
  960. p.190    Under |time_out|: remove the warning line "The same object
  961.     cannot..."
  962.  
  963. p.191    Add two new objects to the end of the list of special objects
  964.     defined by the library:
  965.  
  966.         InformLibrary    Represents the library.  You never need to use
  967.                 it, but it might sometimes be the value of
  968.                 |sender| when a message is received.
  969.         InformParser    Represents the parser.
  970.  
  971. list of library routines: add
  972.  
  973.   *     |ObjectIsUntouchable(obj,flag)|
  974.   *     Determines whether any solid barrier (that is, any |container| that
  975.   *     is not |open|) lies between the player and |obj|.  If |flag| is set,
  976.   *     this routine never prints anything; otherwise it prints a message
  977.   *     like ``You can't, because ... is in the way.'' if any barrier is
  978.   *     found.  Returns |true| if a barrier is found, |false| if not.
  979.  
  980. p.200    (in rule 5)  "Properties, attributes and classes must..." should
  981.     read "Attributes and classes must...".
  982.  
  983. p.202    Lexicon definition of "common property": replace the first sentence
  984.     with:
  985.     
  986.     Any _property_ set by the _class_ |Object| is passed on to every
  987.     _object_, and is called a ``common property'': for example,
  988.     |description|.  All others are _individual properties_.  New
  989.     properties can be declared as common with the |Property| directive.
  990.  
  991.         and delete the final bracketed sentence about the library's
  992.         properties, which doesn't belong in a definition.
  993.  
  994.  
  995. Part II -- Alterations to exercise solutions
  996.            =================================
  997.  
  998. In each case the full revised text of the solution is given.  Some are
  999. hardly altered but others are expanded (e.g. exercise 35) or simplified
  1000. (exercise 54).  However, the prefix #r$ has been deleted in the
  1001. few cases when they occur without giving details (see exercises 79, 80).
  1002. This matters too little to fuss over.
  1003.  
  1004. Exercise 4:
  1005. ----------
  1006. Put any validation rules desired into the |GamePreRoutine|.
  1007. For example, the following will filter out any stray |Drop| actions for
  1008. unheld objects:
  1009.  
  1010.     [ GamePreRoutine;
  1011.       if (action==Drop && noun notin player)
  1012.           "You aren't holding ", (the) noun, ".";
  1013.       rfalse;
  1014.     ];
  1015. ----------
  1016.  
  1017. Exercise 9:
  1018. ----------
  1019. Object -> bag "toothed bag"
  1020.   with name "toothed" "bag",
  1021.        description "A capacious bag with a toothed mouth.",
  1022.        before
  1023.        [; LetGo: "The bag defiantly bites itself
  1024.                   shut on your hand until you desist.";
  1025.           Close: "The bag resists all attempts to close it.";
  1026.        ],
  1027.        after
  1028.        [; Receive:
  1029.                  "The bag wriggles hideously as it swallows ",
  1030.                  (the) noun, ".";
  1031.        ],
  1032.   has  container open;
  1033. ----------
  1034.  
  1035. Exercise 14:
  1036. ----------
  1037. Object -> cage "iron cage"
  1038.   with name "iron" "cage" "bars" "barred" "iron-barred",
  1039.        when_open
  1040.           "An iron-barred cage, large enough to stoop over inside,
  1041.            looms ominously here.",
  1042.        when_closed "The iron cage is closed.",
  1043.        inside_description "You stare out through the bars.",
  1044.   has  enterable container openable open transparent static;
  1045. ----------
  1046.  
  1047. Exercise 17:
  1048. ----------
  1049. Object -> bible "black Tyndale Bible"
  1050.   with name "bible" "black" "book",
  1051.        initial "A black Bible rests on a spread-eagle lectern.",
  1052.        description "A splendid foot-high Bible, which must have survived
  1053.            the burnings of 1520.",
  1054.        before
  1055.        [ w x; Consult:
  1056.                wn = consult_from; w = NextWord();
  1057.                switch(w)
  1058.                {   'matthew': x="Gospel of St Matthew";
  1059.                    'mark': x="Gospel of St Mark";
  1060.                    'luke': x="Gospel of St Luke";
  1061.                    'john': x="Gospel of St John";
  1062.                    default: "There are only the four Gospels.";
  1063.                }
  1064.                if (consult_words==1)
  1065.                    "You read the ", (string) x, " right through.";
  1066.                w = TryNumber(wn);
  1067.                if (w==-1000)
  1068.                    "I was expecting a chapter number in the ",
  1069.                              (string) x, ".";
  1070.                "Chapter ", (number) w, " of the ", (string) x,
  1071.                      " is too sacred for you to understand now.";
  1072.        ];
  1073. ----------
  1074.  
  1075. Exercise 19:
  1076. ----------
  1077. Add the following lines, after the inclusion of |Grammar|:
  1078.  
  1079. [ SayInsteadSub; "[To talk to someone, please type ~someone, something~
  1080.   or else ~ask someone about something~.]"; ];
  1081. Extend "answer" replace * topic -> SayInstead;
  1082. Extend "tell"   replace * topic -> SayInstead;
  1083.  
  1084. A slight snag is that this will throw out ``nigel,
  1085. tell me about the grunfeld defence'' (which the library will normally
  1086. convert to an |Ask| action, but can't if the grammar for ``tell'' is
  1087. missing).  To avoid this, you could (instead of making the above
  1088. directives) |Replace| the |TellSub| routine (see \S 21)
  1089. by the |SayInsteadSub| one.
  1090. ----------
  1091.  
  1092. Exercise 21:
  1093. ----------
  1094. Object -> Charlotte "Charlotte"
  1095.   with name "charlotte" "charlie" "chas",
  1096.        grammar
  1097.        [;  give self ~general;
  1098.            wn=verb_wordnum;
  1099.            if (NextWord()=='simon' && NextWord()=='says')
  1100.            {   give self general;
  1101.                verb_wordnum=verb_wordnum+2;
  1102.            }
  1103.        ],
  1104.        orders
  1105.        [ i;  if (self hasnt general) "Charlotte sticks her tongue out.";
  1106.            WaveHands: "Charlotte waves energetically.";
  1107.            default: "~Don't know how,~ says Charlotte.";
  1108.        ],
  1109.        initial "Charlotte wants to play Simon Says.",
  1110.   has  animate female proper;
  1111.  
  1112. (The variable |i| isn't needed yet, but will be used by the
  1113. code added in the answer to the next exercise.)
  1114. ----------
  1115.  
  1116. Exercise 27:
  1117. ----------
  1118. Object replicator "replicator"
  1119.   with name "replicator",
  1120.        grammar [;  return 'rc,'; ],
  1121.        orders
  1122.        [;  Give:
  1123.                if (noun in self)
  1124.                    "The replicator serves up a cup of ",
  1125.                    (name) noun, " which you drink eagerly.";
  1126.                "~That is not something I can replicate.~";
  1127.            default: "The replicator is unable to oblige.";
  1128.        ],
  1129.        life
  1130.        [;  Ask, Answer, Tell: "The replicator has no conversation skill.";
  1131.        ],
  1132.   has  talkable;
  1133. Object -> "Earl Grey tea"    with name "earl" "grey" "tea";
  1134. Object -> "Aldebaran brandy" with name "aldebaran" "brandy";
  1135. Object -> "distilled water"  with name "distilled" "water";
  1136. ...
  1137. Verb "rc,"    * held      -> Give;
  1138.  
  1139. The point to note here is that the [held] token means `held by the
  1140. replicator' here, as the |actor| is the replicator, so this is a neat way of
  1141. getting a `one of the following phrases' token into the grammar.
  1142. ----------
  1143.  
  1144. Exercise 28:
  1145. ----------
  1146. This is similar to the previous exercises.  One creates an attribute called
  1147. |crewmember| and gives it to the crew objects: the |orders| property is
  1148.  
  1149.        orders
  1150.        [;  Examine:
  1151.                if (parent(noun)==0)
  1152.                    "~", (name) noun,
  1153.                        " is no longer aboard this demonstration game.~";
  1154.                "~", (name) noun, " is in ", (name) parent(noun), ".~";
  1155.            default: "The computer's only really good for locating the crew.";
  1156.        ],
  1157.  
  1158. and the |grammar| simply returns |'stc,'| which is defined as
  1159.  
  1160. [ Crew i;
  1161.   switch(scope_stage)
  1162.   {  1: rfalse;
  1163.      2: objectloop (i has crewmember) PlaceInScope(i); rtrue;
  1164.   }
  1165. ];
  1166. Verb "stc,"   * "where" "is" scope=Crew -> Examine;
  1167.  
  1168. An interesting point is that the scope routine doesn't need to do anything
  1169. at stage 3 (usually used for printing out errors) because the normal
  1170. error-message printing system is never reached.  Something like ``computer,
  1171. where is Comminder Doto'' causes a |##NotUnderstood| order.
  1172. ----------
  1173.  
  1174. Exercise 29:
  1175. ----------
  1176. Object Zen "Zen" Flight_Deck
  1177.   with name "zen" "flight" "computer",
  1178.        initial "Square lights flicker unpredictably across a hexagonal
  1179.                 fascia on one wall, indicating that Zen is on-line.",
  1180.        grammar [;  return 'zen,'; ],
  1181.        orders
  1182.        [;  Show: "The main screen shows a starfield,
  1183.                   turning through ", noun, " degrees.";
  1184.            Go:  "~Confirmed.~  The ship turns to a new bearing.";
  1185.            SetTo: if (noun==0) "~Confirmed.~  The ship comes to a stop.";
  1186.                if (noun>12) print_ret "~Standard by ", (number) noun,
  1187.                                 " exceeds design tolerances.~";
  1188.                print_ret "~Confirmed.~  The ship's engines step to
  1189.                    standard by ", (number) noun, ".";
  1190.            Take: if (noun~=force_wall) "~Please clarify.~";
  1191.                 "~Force wall raised.~";
  1192.            Drop: if (noun~=blasters)   "~Please clarify.~";
  1193.               "~Battle-computers on line.
  1194.                 Neutron blasters cleared for firing.~";
  1195.            default: "~Language banks unable to decode.~";
  1196.        ],
  1197.   has  talkable proper static;
  1198. Object -> force_wall "force wall"     with name "force" "wall" "shields";
  1199. Object -> blasters "neutron blasters" with name "neutron" "blasters";
  1200. ...
  1201. Verb "zen,"   * "scan" number "orbital"        -> Show
  1202.               * "set" "course" "for" Planet    -> Go
  1203.               * "speed" "standard" "by" number -> SetTo
  1204.               * "raise" held                   -> Take
  1205.               * "clear" held "for" "firing"    -> Drop;
  1206.  
  1207. Dealing with |Ask|, |Answer| and |Tell| are left to the reader.
  1208. ----------
  1209.  
  1210. Exercise 33:
  1211. ----------
  1212. We could solve this using a daemon, but for the
  1213. sake of demonstrating a feature of |thedark| we won't.
  1214. In |Initialise|, write |thedark.initial = GoMothGo;|
  1215. and add the routine:
  1216.  
  1217. [ GoMothGo;
  1218.    if (moth in player)
  1219.    {   remove moth;
  1220.       "As your eyes try to adjust, you feel a ticklish sensation
  1221.        and hear a tiny fluttering sound.";
  1222.    }
  1223. ];
  1224. ----------
  1225.  
  1226. Exercise 34:
  1227. ----------
  1228. This is a crude implementation, for brevity (the real Zork
  1229. thief has an enormous stock of attached messages).  A |life| routine
  1230. is omitted, and of course this particular thief steals
  1231. nothing.  See `The Thief' for a much fuller, annotated
  1232. implementation.
  1233. \beginlines
  1234. Object -> thief "thief"
  1235.   with name "thief" "gentleman" "mahu" "modo",
  1236.        each_turn "^The thief growls menacingly.",
  1237.        daemon
  1238.        [ i p j n k;
  1239.            if (random(3)~=1) rfalse;
  1240.            p=parent(thief);
  1241.            objectloop (i in compass)
  1242.            {   j=p.(i.door_dir);
  1243.                if (j ofclass Object && j hasnt door) n++;
  1244.            }
  1245.            if (n==0) rfalse;
  1246.            k=random(n); n=0;
  1247.            objectloop (i in compass)
  1248.            {   j=p.(i.door_dir);
  1249.                if (j ofclass Object && j hasnt door) n++;
  1250.                if (n==k)
  1251.                {   move self to j;
  1252.                    if (p==location) "^The thief stalks away!";
  1253.                    if (j==location) "^The thief stalks in!";
  1254.                    rfalse;
  1255.                }
  1256.            }
  1257.        ],
  1258.   has  animate;
  1259. \endlines
  1260. (Not forgetting to |StartDaemon(thief)| at some point, for instance
  1261. in the game's |Initialise| routine.)  So the thief walks at random but
  1262. never via doors, bridges and the like (because these may be locked
  1263. or have rules attached); it's only a first approximation, and in a
  1264. good game one should occasionally see the thief do something
  1265. surprising, such as open a secret door.  As for the |name|, note
  1266. that `The Prince of darkness is a gentleman. Modo he's called, and Mahu'
  1267. (William Shakespeare, _King Lear_ III iv.)
  1268. ----------
  1269.  
  1270. Exercise 35:
  1271. ----------
  1272. We shall use a new property called |weight| and decide that
  1273. any object which doesn't provide any particular weight will weigh
  1274. 10 units.  Clearly, an object which contains other objects will
  1275. carry their weight too, so:
  1276.  
  1277. [ WeightOf obj t i;
  1278.    if (obj provides weight) t = obj.weight; else t = 10;
  1279.    objectloop (i in obj) t = t + WeightOf(i);
  1280.    return t;
  1281. ];
  1282.  
  1283. Once every turn we shall check how much the player is carrying
  1284. and adjust a measure of the player's fatigue accordingly.  There
  1285. are many ways we could choose to calculate this: for the sake of
  1286. example we'll define two constants:
  1287.  
  1288. Constant CARRYING_STRENGTH = 500;
  1289. Constant HEAVINESS_THRESHOLD = 100;
  1290.  
  1291. Initially the player's strength will be the maximum possible,
  1292. which we'll set to 500.  Each turn the amount of weight being
  1293. carried is substracted from this, but 100 is also added on
  1294. (without exceeding the maximum value).  So if the player carries
  1295. more than 100 units, then her strength declines, but by dropping
  1296. things to get the weight below 100 she can allow it to recover.
  1297. If she drops absolutely everything, her entire strength will
  1298. recuperate in at most 5 turns.  Exhaustion sets in if her strength
  1299. reaches 0, and at this point she is forced to drop something,
  1300. which gives her strength a slight boost.  Anyway, here's an
  1301. implementation of all this:
  1302.  
  1303. Object weight_monitor
  1304.   with players_strength,
  1305.        warning_level 5,
  1306.        activate
  1307.        [;  self.players_strength = CARRYING_STRENGTH; StartDaemon(self);
  1308.        ],
  1309.        daemon
  1310.        [ w s b bw;
  1311.             if (location ~= Weights_Room) { StopDaemon(self); return; }
  1312.             s = self.players_strength
  1313.                 - WeightOf(player) + HEAVINESS_THRESHOLD;
  1314.             if (s<0) s=0; if (s>CARRYING_STRENGTH) s=CARRYING_STRENGTH;
  1315.             self.players_strength = s;
  1316.             if (s==0)
  1317.             {   bw=-1;
  1318.                 objectloop(b in player)
  1319.                     if (WeightOf(b) > bw) { bw = WeightOf(b); w=b; }
  1320.                 self.players_strength = self.players_strength + bw;
  1321.                 print "^Exhausted with carrying so much, you decide 
  1322.                     to discard ", (the) w, ": "; <<Drop w>>;
  1323.             }
  1324.             w=s/100; if (w==self.warning_level) return;
  1325.             self.warning_level = w;
  1326.             switch(w)
  1327.             {   3: "^You are feeling a little tired.";
  1328.                 2: "^You possessions are weighing you down.";
  1329.                 1: "^Carrying so much weight is wearing you out.";
  1330.                 0: "^You're nearly exhausted enough to drop everything
  1331.                      at an inconvenient moment.";
  1332.             }
  1333.        ];
  1334.  
  1335. Notice that items are actually dropped with |Drop| actions: one of them
  1336. might be, say, a wild boar, which would bolt away into the forest when
  1337. released.  The daemon tries to drop the heaviest item.  (Obviously a little
  1338. improvement would be needed if the game contained, say, an un-droppable
  1339. but very heavy ball and chain.)  Finally, of course, at some point
  1340. the weight monitor has to be sent an |activate| message to get things
  1341. going.
  1342. ----------
  1343.  
  1344. Exercise 44:
  1345. ----------
  1346. The common man's _wayhel_ was a lowly mouse.  Since we think
  1347. much more highly of the player:
  1348.  
  1349. Object hog "Warthog" Caldera
  1350.   with name "wart" "hog" "warthog", description "Muddy and grunting.",
  1351.        number 0,
  1352.        initial "A warthog snuffles and grunts about in the ash.",
  1353.        orders
  1354.        [;  Go, Look, Examine, Eat, Smell, Taste, Touch: rfalse;
  1355.            default: "Warthogs can't do anything as tricky as that!";
  1356.        ],
  1357.   has  animate proper;
  1358.  
  1359. and we just |ChangePlayer(warthog);|.  Note that the same |orders|
  1360. routine applies to the player-as-human typing "warthog, listen"
  1361. as to the player-as-warthog typing just "listen".
  1362. ----------
  1363.  
  1364. Exercise 48:
  1365. ----------
  1366. See the _Inform Translator's Manual_.  One must provide
  1367. a new grammar file (generating the same actions but from different
  1368. syntax), tables showing how pronouns, possessives and articles work
  1369. in the new language, a sheaf of translated library messages and
  1370. so on.  But it can be done.
  1371. ----------
  1372.  
  1373. Exercise 54:
  1374. ----------
  1375. Class  Coin
  1376.   with name "coin" "coins//p",
  1377.        description "A round unstamped disc, presumably local currency.",
  1378.        list_together "coins",
  1379.        plural
  1380.        [;  print (string) (self.&name)-->0;
  1381.            if (~~(listing_together ofclass Coin)) print " coins";
  1382.        ],
  1383.        short_name
  1384.        [;  if (listing_together ofclass Coin)
  1385.            {   print (string) (self.&name)-->0; rtrue; }
  1386.        ],
  1387.        article
  1388.        [;  if (listing_together ofclass Coin) print "one"; else print "a";
  1389.        ];
  1390. Class  Gold_coin   class Coin with name "gold";
  1391. Class  Silver_coin class Coin with name "silver";
  1392. Class  Bronze_coin class Coin with name "bronze";
  1393. SilverCoin -> "silver coin";
  1394. ... and so on
  1395. ----------
  1396.  
  1397. Exercise 55:
  1398. ----------
  1399. Firstly, a printing rule to print the state of coins.  Coin-objects
  1400. will have a property called |way_up| which is always either 1 or 2:
  1401.  
  1402. [ Face x; if (x.way_up==1) print "Heads"; else print "Tails"; ];
  1403.  
  1404. There are two kinds of coin but we'll implement them with three
  1405. classes: |Coin| and two sub-categories, |GoldCoin| and |SilverCoin|.
  1406. Since the coins only join up into trigrams when present in groups
  1407. of three, we need a routine to detect this:
  1408.  
  1409. [ CoinsTogether cla i x y;
  1410.   objectloop (i ofclass cla)
  1411.   {   x=parent(i);
  1412.       if (y==0) y=x; else { if (x~=y) return 0; }
  1413.   }
  1414.   return y;
  1415. ];
  1416.  
  1417. Thus |CoinsTogether(cla)| decides whether all objects of class |cla|
  1418. are in the same place.  (|cla| will always be either |GoldCoin| or
  1419. |SilverCoin|.)  We must now write the class definitions:
  1420.  
  1421. Class  Coin
  1422.   with name "coin" "coins//p",
  1423.        way_up 1, article "the",
  1424.        after
  1425.        [; Drop, PutOn:
  1426.              self.way_up = random(2); print (Face) self;
  1427.              if (CoinsTogether(self.which_class))
  1428.              {   print ". The ";
  1429.                  if (self.which_class == GoldCoin)
  1430.                      print "gold"; else print "silver";
  1431.                  " trigram is now ", (Trigram) self.which_class;
  1432.              }
  1433.              ".";
  1434.        ];
  1435. [ CoinLT k i c;
  1436.   if (inventory_stage==1)
  1437.   {   if (self.which_class == GoldCoin)
  1438.           print "the gold"; else print "the silver";
  1439.       print " coins ";
  1440.       k=CoinsTogether(self.which_class);
  1441.       if (k==location || k has supporter)
  1442.       {   objectloop (i ofclass self.which_class)
  1443.           {   print (name) i;
  1444.               switch(++c)
  1445.               {  1: print ", "; 2: print " and ";
  1446.                  3: print " (showing the trigram ",
  1447.                     (Trigram) self.which_class, ")";
  1448.               }
  1449.           }
  1450.           rtrue;
  1451.       }
  1452.       if (~~(c_style & ENGLISH_BIT))   c_style = c_style + ENGLISH_BIT;
  1453.       if (~~(c_style & NOARTICLE_BIT)) c_style = c_style + NOARTICLE_BIT;
  1454.       if (c_style & NEWLINE_BIT)       c_style = c_style - NEWLINE_BIT;
  1455.       if (c_style & INDENT_BIT)        c_style = c_style - INDENT_BIT;
  1456.   }
  1457.   rfalse;
  1458. ];
  1459. Class  GoldCoin class Coin
  1460.   with name "gold", which_class GoldCoin,
  1461.        list_together [; return CoinLT(); ];
  1462. Class  SilverCoin class Coin
  1463.   with name "silver", which_class SilverCoin,
  1464.        list_together [; return CoinLT(); ];
  1465.  
  1466. (There are two unusual points here.  Firstly, the |CoinsLT| routine
  1467. is not simply given as the common |list_together| value in the |coin|
  1468. class since, if it were, all six coins would be grouped together:
  1469. we want two groups of three, so the gold and silver coins have to have
  1470. different |list_together| values.  Secondly, if a trigram is together
  1471. and on the floor, it is not good enough to simply append text like
  1472. "showing Tails, Heads, Heads (change)" at |inventory_stage| 2 since the
  1473. coins may be listed in a funny order: for example, in the order snake,
  1474. robin, bison.  In that event, the order the coins are listed in
  1475. doesn't correspond to the order their values are listed in, which is
  1476. misleading.  So instead |CoinsLT| takes over entirely at
  1477. |inventory_stage| 1 and prints out the list of three itself, returning
  1478. true to stop the list from being printed out by the library as well.)
  1479. To resume: whenever coins are listed together, they are grouped
  1480. into gold and silver.  Whenever trigrams are visible they are to be
  1481. described by either |Trigram(GoldClass)| or |Trigram(SilverClass)|:
  1482.  
  1483. Array gold_trigrams -->   "fortune" "change" "river flowing" "chance"
  1484.                           "immutability" "six stones in a circle"
  1485.                           "grace" "divine assistance";
  1486. Array silver_trigrams --> "happiness" "sadness" "ambition" "grief"
  1487.                           "glory" "charm" "sweetness of nature"
  1488.                           "the countenance of the Hooded Man";
  1489. [ Trigram cla i k state;
  1490.   objectloop (i ofclass cla)
  1491.   {   print (Face) i; if (k++<2) print ","; print " ";
  1492.       state=state*2 + (i.way_up-1);
  1493.   }
  1494.   if (cla == GoldCoin) i=gold_trigrams; else i=silver_trigrams;
  1495.   print "(", (string) i-->state, ")";
  1496. ];
  1497.  
  1498. (These interpretations of the coins are quite bogus.)  Finally
  1499. we have to make the six actual coins:
  1500.  
  1501. GoldCoin ->   "goat"    with name "goat";
  1502. GoldCoin ->   "deer"    with name "deer";
  1503. GoldCoin ->   "chicken" with name "chicken";
  1504. SilverCoin -> "robin"   with name "robin";
  1505. SilverCoin -> "snake"   with name "snake";
  1506. SilverCoin -> "bison"   with name "bison";
  1507. ----------
  1508.  
  1509. Exercise 57:
  1510. ----------
  1511. Object -> "/?%?/ (the artiste formally known as Princess)"
  1512.   with name "princess" "artiste" "formally" "known" "as",
  1513.        short_name
  1514.        [;   if (self hasnt general) { print "Princess"; rtrue; }
  1515.        ],
  1516.        react_before
  1517.        [;  Listen: print_ret (name) self, " sings a soft siren song.";
  1518.        ],
  1519.        initial
  1520.        [;  print_ret (name) self, " is singing softly.";
  1521.        ],
  1522.        parse_name
  1523.        [ x n; if (self hasnt general)
  1524.             {   if (NextWord()=='princess') return 1;
  1525.                 return 0;
  1526.             }
  1527.             x=WordAddress(wn);
  1528.             if (   x->0 == '/' && x->1 == '?' && x->2 == '%'
  1529.                 && x->3 == '?' && x->4 == '/')
  1530.             {   while (wn<=parse->1 && WordAddress(wn++)<x+5) n++;
  1531.                 return n;
  1532.             }
  1533.             return -1;
  1534.        ],
  1535.        life
  1536.        [;   Kiss: give self general; self.life = NULL;
  1537.                 "In a fairy-tale transformation, the Princess 
  1538.                  steps back and astonishes the world by announcing 
  1539.                  that she will henceforth be known as ~/?%?/~.";
  1540.        ],
  1541.   has  animate proper female;
  1542. ----------
  1543.  
  1544. Exercise 61:
  1545. ----------
  1546. [ ParseNoun;
  1547.   if (WordLength(wn)==1 && WordAddress(wn)->0 == '#') return 1;
  1548.   return -1;
  1549. ----------
  1550.  
  1551. Exercise 62:
  1552. ----------
  1553. [ ParseNoun;
  1554.   if (WordLength(wn)==1 && WordAddress(wn)->0 == '#') return 1;
  1555.   if (WordLength(wn)==1 && WordAddress(wn)->0 == '*')
  1556.   {   parser_action = ##PluralFound; return 1; }
  1557.   return -1;
  1558. ];
  1559. ----------
  1560.  
  1561. Exercise 65:
  1562. ----------
  1563. Because the parser might go on to reject the line it's working on:
  1564. for instance, if the player typed "shazam splurge" then the message
  1565. "Shazam!" followed by a parser complaint will be somewhat unedifying.
  1566. ----------
  1567.  
  1568. Exercise 66:
  1569. ----------
  1570. The scheme will work like this: any room that ought to have a name
  1571. should have a |place_name| property set to a dictionary word;
  1572. say, the Bedquilt cave could be called |'bedquilt'|.  Clearly
  1573. you should only be allowed to type this from adjacent rooms.
  1574. So we'll implement the following: you can only move by name to
  1575. those rooms listed in the current room's |to_places| property.
  1576. For instance, the Soft Room might have |to_places| set to
  1577.  
  1578. to_places Bedquilt Slab_Room Twopit_Room;
  1579.  
  1580. Now the code: if the player's verb is not otherwise understood,
  1581. we'll check it to see if it's a place name of a nearby room,
  1582. and if so store that room's object number in |goto_room|, converting
  1583. the verb to |'go#room'| (which we'll deal with below).
  1584.  
  1585. Global goto_room;
  1586. [ UnknownVerb word p i;
  1587.     p = location.&to_places; if (p==0) rfalse;
  1588.     for (i=0:(2*i)<location.#to_places:i++)
  1589.         if (word==(p-->i).place_name)
  1590.         {   goto_room = p-->i; return 'go#room';
  1591.         }
  1592.     rfalse;
  1593. ];
  1594. [ PrintVerb word;
  1595.     if (word=='go#room')
  1596.     {   print "go to ", (name) goto_room; rtrue; }
  1597.     rfalse;
  1598. ];
  1599.  
  1600. (The supplied |PrintVerb| is icing on the cake: so the parser can
  1601. say something like "I only understood you as far as wanting to go to
  1602. Bedquilt." in reply to, say, "bedquilt the nugget".)  It remains
  1603. only to create the dummy verb:
  1604.  
  1605. [ GoRoomSub;
  1606.     if (goto_room hasnt visited) "But you have never been there.";
  1607.     PlayerTo(goto_room);
  1608. ];
  1609. Verb "go#room"  *                                -> GoRoom;
  1610.  
  1611. Note that if you don't know the way, you can't go there!  A purist might
  1612. prefer instead to not recognise the name of an unvisited room, back at
  1613. the |UnknownVerb| stage, to avoid the player being able to deduce names
  1614. of nearby rooms from this `error message'.
  1615. ----------
  1616.  
  1617. Exercise 71:
  1618. ----------
  1619. Again, the first question is how to store the
  1620. number dialled: in this case, into a |string| array.  The token is:
  1621.  
  1622. Constant MAX_PHONE_LENGTH = 30;
  1623. Array dialled_number string MAX_PHONE_LENGTH;
  1624. [ PhoneNumber f a l ch pp i;
  1625.   pp=1; if (NextWordStopped()==-1) return 0;
  1626.   do
  1627.   {   a=WordAddress(wn-1); l=WordLength(wn-1);
  1628.       for (i=0:i<l:i++)
  1629.       {   ch=a->i;
  1630.           if (ch<'0' || ch>'9')
  1631.           {   if (ch~='-') { f=1; if (i~=0) return -1; } }
  1632.           else
  1633.           {   if (pp<MAX_PHONE_LENGTH)
  1634.                   dialled_number->(pp++)=ch-'0';
  1635.           }
  1636.       }
  1637.   } until (f==1 || NextWordStopped()==-1);
  1638.   if (pp==1) return -1;
  1639.   dialled_number->0 = pp-1;
  1640.   return 0;
  1641. ];
  1642.  
  1643. To demonstrate this in use,
  1644.  
  1645. [ DialPhoneSub i;
  1646.   print "You dialled <";
  1647.   for (i=1:i<=dialled_number->0:i++) print dialled_number->i;
  1648.   ">";
  1649. ];
  1650. Verb "dial"  * PhoneNumber -> DialPhone;
  1651. ----------
  1652.  
  1653. Exercise 81:
  1654. ----------
  1655. A slight refinement of such a "purloin" verb is already defined
  1656. in the library (if the constant |DEBUG| is defined), so there's no need.
  1657. But here's how it could be done:
  1658.  
  1659. [ Anything i;
  1660.   if (scope_stage==1) rfalse;
  1661.   if (scope_stage==2)
  1662.   {   objectloop (i ofclass Object) PlaceInScope(i); rtrue; }
  1663.   "No such in game.";
  1664. ];
  1665.  
  1666. (This disallows multiple matches for efficiency reasons -- the parser has
  1667. enough work to do with such a huge scope definition as it is.)  Now
  1668. the token |scope=Anything| will match anything at all, even things like
  1669. the abstract concept of `east'.
  1670.  
  1671.  
  1672. Part III -- Alterations to library messages (section A9)
  1673.             ============================================
  1674.  
  1675. The text is altered throughout, so here is an entirely new version of
  1676. section A9.
  1677.  
  1678.  
  1679. Answer  "There is no reply."
  1680. Ask   "There is no reply."
  1681. Attack  "Violence isn't the answer to this one."
  1682. Blow   "You can't usefully blow that/those."
  1683. Burn   "This dangerous act would achieve little."
  1684. Buy   "Nothing is on sale."
  1685. Climb  "I don't think much is to be achieved by that."
  1686. Close  1. "That's/They're not something you can close."
  1687.    2. "That's/They're already closed."
  1688.    3. "You close <x1>."
  1689. Consult "You discover nothing of interest in <x1>."
  1690. Cut   "Cutting that/those up would achieve little."
  1691. Dig   "Digging would achieve nothing here."
  1692. Disrobe 1. "You're not wearing that/those."
  1693.    2. "You take off <x1>."
  1694. Drink  "There's nothing suitable to drink here."
  1695. Drop   1. "The <x1> is/are already here."
  1696.    2. "You haven't got that/those."
  1697.    3. "(first taking <x1> off)"
  1698.    4. "Dropped."
  1699. Eat   1. "That's/They're plainly inedible."
  1700.    2. "You eat <x1>. Not bad."
  1701. EmptyT  1. <x1> " can't contain things."
  1702.    2. <x1> " is/are closed."
  1703.    <x1> " is/are empty already."
  1704. Enter  1. "But you're already on/in <x1>."
  1705.    2. "That's/They're not something you can enter."
  1706.    3. "You can't get into the closed <x1>."
  1707.    4. "You can only get into something freestanding."
  1708.    5. "You get onto/into <x1>."
  1709. Examine 1. "Darkness, noun. An absence of light to see by."
  1710.    2. "You see nothing special about <x1>."
  1711.    3. "<x1> is/are currently switched on/off."
  1712. Exit   1. "But you aren't in anything at the moment."
  1713.    2. "You can't get out of the closed <x1>."
  1714.    3. "You get off/out of <x1>."
  1715. Fill   "But there's no water here to carry."
  1716. FullScore 1. "The score is/was made up as follows:|^|"
  1717.    2. "finding sundry items"
  1718.    3. "visiting various places"
  1719.    4. "total (out of |MAX_SCORE|)"
  1720. GetOff  "But you aren't on <x1> at the moment."
  1721. Give   1. "You aren't holding <x1>."
  1722.    2. "You juggle <x1> for a while, but don't achieve much."
  1723.    3. "<x1> doesn't/don't seem interested."
  1724. Go  1. "You'll have to get off/out of <x1> first."
  1725.    2. "You can't go that way."
  1726.    3. "You are unable to climb <x1>."
  1727.    4. "You are unable to descend <x1>."
  1728.    5. "You can't, since <x1> is/are in the way."
  1729.    6. "You can't, since <x1> leads nowhere."
  1730. Insert  1. "You need to be holding <x1> before you
  1731. can put it/them into something else."
  1732.    2. "That/Those can't contain things."
  1733.    3. "<x1> is/are closed."
  1734.    4. "You'll need to take it/them off first."
  1735.    5. "You can't put something inside itself."
  1736.    6. "(first taking it/them off)|^|"
  1737.    7. "There is no more room in <x1>."
  1738.    8. "Done."
  1739.    9. "You put <x1> into <second>."
  1740. Inv   1. "You are carrying nothing."
  1741.    2. "You are carrying" 
  1742. Jump   "You jump on the spot, fruitlessly."
  1743. JumpOver "You would achieve nothing by this."
  1744. Kiss   "Keep your mind on the game."
  1745. Listen  "You hear nothing unexpected."
  1746. LMode1  " is now in its normal ~brief~ printing mode, which gives
  1747. long descriptions of places never before visited and short
  1748. descriptions otherwise."
  1749. LMode2  " is now in its ~verbose~ mode, which always gives long
  1750. descriptions of locations (even if you've been there before)."
  1751. LMode3  " is now in its ~superbrief~ mode, which always gives short
  1752. descriptions of locations (even if you haven't been there before)."
  1753. Lock   1. "That doesn't/They don't seem to be something you can lock."
  1754.    2. "That's/They're locked at the moment."
  1755.    3. "First you'll have to close <x1>."
  1756.    4. "That doesn't/Those don't seem to fit the lock."
  1757.    5. "You lock <x1>."
  1758. Look 1. " (on <x1>)"
  1759.    2. " (in <x1>)"
  1760.    3. " (as <x1>)" 
  1761.    4. "|^|On <x1> is/are <list of children>"
  1762.    5. "[On/In <x1>] you/You can also see <list of children> [here]."
  1763.    6. "[On/In <x1>] you/You can see <list of children> [here]."
  1764. LookUnder 1. "But it's dark."
  1765.    "You find nothing of interest."
  1766. Mild   "Quite."
  1767. ListMiscellany 1. " (providing light)"
  1768.    2. " (which is/are closed)"
  1769.    3. " (closed and providing light)"
  1770.    4. " (which is/are empty)"
  1771.    5. " (empty and providing light)"
  1772.    6. " (which is/are closed and empty)"
  1773.    7. " (closed, empty and providing light)"
  1774.    8. " (providing light and being worn"
  1775.    9. " (providing light"
  1776.   10. " (being worn"
  1777.   11. " (which is/are "
  1778.   12. "open"
  1779.   13. "open but empty"
  1780.   14. "closed"
  1781.   15. "closed and locked"
  1782.   16. " and empty"
  1783.   17. " (which is/are empty)"
  1784.   18. " containing "
  1785.   19. " (on "
  1786.   20. ", on top of "
  1787.   21. " (in "
  1788.   22. ", inside "
  1789. Miscellany 1. "(considering the first sixteen objects only)|^|"
  1790.    2. "Nothing to do!"
  1791.    3. " You have died "
  1792.    4. " You have won "
  1793.    5. (The RESTART/RESTORE/QUIT and possibly FULL
  1794. and AMUSING query, printed after the game is over.)
  1795.    6. "[Your interpreter does not provide undo. Sorry!]"
  1796.    7. "Undo failed. [Not all interpreters provide it.]"
  1797.    8. "Please give one of the answers above."
  1798.    9. "|^|It is now pitch dark in here!"
  1799.   10. "I beg your pardon?"
  1800.   11. "[You can't "undo" what hasn't been done!]"
  1801.   12. "[Can't "undo" twice in succession. Sorry!]"
  1802.   13. "[Previous turn undone.]"
  1803.   14. "Sorry, that can't be corrected."
  1804.   15. "Think nothing of it."
  1805.   16. ""Oops" can only correct a single word."
  1806.   17. "It is pitch dark, and you can't see a thing."
  1807.   18. "yourself" (the short name of the |selfobj| object)
  1808.   19. "As good-looking as ever."
  1809.   20. "To repeat a command like "frog, jump", just say
  1810. "again", not "frog, again"."
  1811.   21. "You can hardly repeat that."
  1812.   22. "You can't begin with a comma."
  1813.   23. "You seem to want to talk to someone, but I can't see whom."
  1814.   24. "You can't talk to <x1>."
  1815.   25. "To talk to someone, try "someone, hello" or some such."
  1816.   26. "(first taking <|not_holding|>)"
  1817.   27. "I didn't understand that sentence."
  1818.   28. "I only understood you as far as wanting to "
  1819.   29. "I didn't understand that number."
  1820.   30. "You can't see any such thing."
  1821.   31. "You seem to have said too little!"
  1822.   32. "You aren't holding that!"
  1823.   33. "You can't use multiple objects with that verb."
  1824.   34. "You can only use multiple objects once on a line."
  1825.   35. "I'm not sure what "<pronoun>" refers to."
  1826.   36. "You excepted something not included anyway!"
  1827.   37. "You can only do that to something animate."
  1828.   38. "That's not a verb I recognise."
  1829.   39. "That's not something you need to refer to in the
  1830. course of this game."
  1831.   40. "You can't see "<pronoun>" (<value>) at the moment."
  1832.   41. "I didn't understand the way that finished."
  1833.   42. "None/only <x1> of those is/are available."
  1834.   43. "Nothing to do!"
  1835.   44. "There are none at all available!"
  1836.   45. "Who do you mean, "
  1837.   46. "Which do you mean, "
  1838.   47. "Sorry, you can only have one item here. Which exactly?"
  1839.   48. "Whom do you want [<actor>] to <command>?"
  1840.   49. "What do you want [<actor>] to <command>?"
  1841.   50. "Your score has just gone up/down by <x1> point/points."
  1842.   51. "(Since something dramatic has happened, your list of
  1843. commands has been cut short.)"
  1844.   52. "Type a number from 1 to <x1>, 0 to redisplay or press ENTER."
  1845.   53. "[Please press SPACE.]"
  1846. No    see \bf Yes
  1847. NotifyOff "Score notification off."
  1848. NotifyOn "Score notification on."
  1849. Objects 1. "Objects you have handled:|^|"
  1850.    2. "None."
  1851.    3. "   (worn)"
  1852.    4. "   (held)"
  1853.    5. "   (given away)"
  1854.    6. "   (in <x1>)" [without article]
  1855.    7. "   (in <x1>)" [with article]
  1856.    8. "   (inside <x1>)"
  1857.    9. "   (on <x1>)"
  1858.   10. "   (lost)"
  1859. Open   1. "That's/They're not something you can open."
  1860.    2. "It seems/They seem to be locked."
  1861.    3. "That's/They're already open."
  1862.    4. "You open <x1>, revealing <list of children of x1>"
  1863.    5. "You open <x1>."
  1864. Order  "<x1> has/have better things to do."
  1865. Places  "You have visited: " 
  1866. Pray   "Nothing practical results from your prayer."
  1867. Prompt 1. "|^>|"
  1868. Pronouns 1. "At the moment, "
  1869.    2. "means "
  1870.    3. "is unset "
  1871.    4. "no pronouns are known to the game."
  1872. Pull  1. "It is/Those are fixed in place."
  1873.    2. "You are unable to."
  1874.    3. "Nothing obvious happens."
  1875.    4. "That would be less than courteous."
  1876. Push see \bf Pull
  1877. PushDir 1. "Is that the best you can think of?"
  1878.    2. "That's not a direction."
  1879.    3. "Not that way you can't."
  1880. PutOn  1. "You need to be holding <x1> before you
  1881. can put it/them on top of something else."
  1882.    2. "You can't put something on top of itself."
  1883.    3. "Putting things on <x1> would achieve nothing."
  1884.    4. "You lack the dexterity."
  1885.    5. "(first taking it/them off)|^|"
  1886.    6. "There is no more room on <x1>."
  1887.    7. "Done."
  1888.    8. "You put <x1> on <second>."
  1889. Quit   1. "Please answer yes or no."
  1890.    2. "Are you sure you want to quit? " 
  1891. Remove  1. "It is/They are unfortunately closed."
  1892.    2. "But it isn't/they aren't there now."
  1893.    3. "Removed."
  1894. Restart 1. "Are you sure you want to restart? "
  1895.    2. "Failed."
  1896. Restore 1. "Restore failed."
  1897.    2. "Ok."
  1898. Rub   "You achieve nothing by this."
  1899. Save   1. "Save failed."
  1900.    2. "Ok."
  1901. Score  "You have so far/In that game you scored <score> out of
  1902. a possible |MAX_SCORE|, in <turns> turn/turns"
  1903. ScriptOn 1. "Transcripting is already on."
  1904.    2. "Start of a transcript of"
  1905. ScriptOff 1. "Transcripting is already off."
  1906.    2. "|^|End of transcript."
  1907. Search  1. "But it's dark."
  1908.    2. "There is nothing on <x1>."
  1909.    3. "On <x1> is/are <list of children>."
  1910.    4. "You find nothing of interest."
  1911.    5. "You can't see inside, since <x1> is/are closed."
  1912.    6. "<x1> is/are empty."
  1913.    7. "In <x1> is/are <list of children>."
  1914. Set   "No, you can't set that/those."
  1915. SetTo  "No, you can't set that/those to anything."
  1916. Show   1. "You aren't holding <x1>."
  1917.    2. "<x1> is/are unimpressed."
  1918. Sing   "Your singing is abominable."
  1919. Sleep  "You aren't feeling especially drowsy."
  1920. Smell  "You smell nothing unexpected."
  1921. Sorry  "Oh, don't apologise."
  1922. Squeeze 1. "Keep your hands to yourself."
  1923.    2. "You achieve nothing by this."
  1924. Strong  "Real adventurers do not use such language."
  1925. Swim   "There's not enough water to swim in."
  1926. Swing  "There's nothing sensible to swing here."
  1927. SwitchOff 1. "That's/They're not something you can switch."
  1928.    2. "That's/They're already off."
  1929.    3. "You switch <x1> off."
  1930. SwitchOn 1. "That's/They're not something you can switch."
  1931.    2. "That's/They're already on."
  1932.    3. "You switch <x1> on."
  1933. Take   1. "Taken."
  1934.    2. "You are always self-possessed."
  1935.    3. "I don't suppose <x1> would care for that."
  1936.    4. "You'd have to get off/out of <x1> first."
  1937.    5. "You already have that/those."
  1938.    6. "That seems/Those seem to belong to <x1>."
  1939.    7. "That seems/Those seem to be a part of <x1>."
  1940.    8. "That isn't/Those aren't available."
  1941.    9. "<x1> isn't/aren't open."
  1942.    10. "That's/They're hardly portable."
  1943.    11. "That's/They're fixed in place."
  1944.    12. "You're carrying too many things already."
  1945.    13. "(putting <x1> into |SACK_OBJECT| to make room)"
  1946. Taste  "You taste nothing unexpected."
  1947. Tell   1. "You talk to yourself a while."
  1948.    2. "This provokes no reaction."
  1949. Touch  1. "Keep your hands to yourself!"
  1950.    2. "You feel nothing unexpected."
  1951.    3. "If you think that'll help."
  1952. Think  "What a good idea."
  1953. Tie   "You would achieve nothing by this."
  1954. ThrowAt 1. "Futile."
  1955.    2. "You lack the nerve when it comes to the crucial moment."
  1956. Turn see \bf Pull
  1957. Unlock  1. "That doesn't/They don't seem to be something you can unlock."
  1958.    2. "It's/They're unlocked at the moment."
  1959.    3. "That doesn't/Those don't seem to fit the lock."
  1960.    4. "You unlock <x1>."
  1961. VagueGo "You'll have to say which compass direction to go in."
  1962. Verify  1. "The game file has verified as intact."
  1963.    2. "The game file did not verify properly, and may be corrupted
  1964. (or you may be running it on a very primitive interpreter which
  1965. is unable properly to perform the test)."
  1966. Wait   "Time passes."
  1967. Wake   "The dreadful truth is, this is not a dream."
  1968. WakeOther "That seems unnecessary."
  1969. Wave   1. "But you aren't holding that/those."
  1970.    2. "You look ridiculous waving <x1>."
  1971. WaveHands "You wave, feeling foolish."
  1972. Wear   1. "You can't wear that/those!"
  1973.    2. "You're not holding that/those!"
  1974.    3. "You're already wearing that/those!"
  1975.    4. "You put on <x1>."
  1976. Yes   "That was a rhetorical question."
  1977.  
  1978.